package com.tenebrous.jestic.mapper.idao.framwork.meber.organ;

import com.tenebrous.jestic.entity.framwork.meber.organ.OrgRoster;
import com.tenebrous.jestic.entity.framwork.meber.organ.OrgRosterHistory;
import com.tenebrous.jestic.mapper.ISuperMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//@Mapper
public interface OrgRosterHistoryMapper extends ISuperMapper<OrgRosterHistory> {

    @Select("SELECT * FROM ORG_ROSTER_HISTORY A WHERE A.STYPE=#{stype} ORDER BY A.ACTIVED DESC,A.CREATE_DATE DESC")
    List<OrgRosterHistory> selectByCondition(@Param("stype") String stype);

    @Select("SELECT * FROM ORG_ROSTER A WHERE A.HISID=#{hisid} AND A.USERID=#{userid}")
    OrgRoster getByHisidAndUserid(@Param("hisid") String hisid, @Param("userid") String userid);
}